package com.ellecity06.debugtools.widgets.floatingview

import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.FrameLayout
import android.widget.ImageView
import androidx.annotation.DrawableRes
import com.ellecity06.debugtools.R

/**
 * @author lwh
 * @Date 2019/11/21 17:58
 * @description 悬浮窗
 */
internal class LFloatingView(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {

    private val mIcon: ImageView

    init {
        View.inflate(context, R.layout.layout_floating_view, this)
        mIcon = findViewById(R.id.icon)
    }

    fun setIconImage(@DrawableRes resId: Int) {
        mIcon.setImageResource(resId)
    }

}
